package com.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.demo.entity.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.jetbrains.annotations.NotNull;
import javax.validation.constraints.Size;

/**
 * <p>
 *
 * </p>
 *
 * @author Ymj
 * @since 2020-11-23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@ApiModel("用户个人信息")
public class Person extends BaseEntity {

    @NotNull
    @TableField(value = "p_name")
    @ApiModelProperty("姓名")
    private String name;

    @NotNull
    @Size(min = 0, max = 100)
    @TableField(value = "p_age")
    @ApiModelProperty("年龄")
    private int age;

    @NotNull
    @Size(min = 0, max = 1)
    @TableField(value = "p_sex")
    @ApiModelProperty("性别")
    private int sex;//0:男性1:女性

    @NotNull
    @Size(min = 0, max = 4)
    @TableField(value = "p_role")
    @ApiModelProperty("人员类别")
    private int role;//0:外来人员1:本科生2:研究生3:教工4:职工
    /**
     * 0:null
     * 1:ABCE
     * 2:ABCE
     * 3:ABCDE
     * 4:A
     */

    @NotNull
    @TableField(value = "p_apartment")
    @ApiModelProperty("住址")
    private String apartment;

    @NotNull
    @TableField(value = "p_phone")
    @ApiModelProperty("电话号码")
    private String phone;

}
